package com.zb.sannuo.thereport.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zb.sannuo.common.domain.search.JCFrequency;
import com.zb.sannuo.common.domain.vo.ReportVo;
import com.zb.sannuo.thereport.mapper.ConsumerDataMapper;
import com.zb.sannuo.thereport.service.ConsumerDateService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ConsumerDataServiceImpl extends ServiceImpl<ConsumerDataMapper, JCFrequency> implements ConsumerDateService {

    @Resource
    private ConsumerDataMapper consumerDataMapper;

    @Override
    public Page FrequencyPage(int current, int number, ReportVo reportVo) {

        System.out.println(consumerDataMapper);
        Page page = new Page(current, number);
        return page.setRecords(consumerDataMapper.findFrequency(page, reportVo));
    }

    @Override
    public Page JclPage(int current, int number, ReportVo reportVo) {

        System.out.println(consumerDataMapper);
        Page page = new Page(current, number);
        return page.setRecords(consumerDataMapper.findJcl(page, reportVo));
    }

    @Override
    public Page YclPage(int current, int number, ReportVo reportVo) {

        System.out.println(consumerDataMapper);
        Page page = new Page(current, number);
        return page.setRecords(consumerDataMapper.findYcl(page, reportVo));
    }

    @Override
    public Page findData(int current, int number, ReportVo reportVo) {

        System.out.println(consumerDataMapper);
        Page page = new Page(current, number);
        return page.setRecords(consumerDataMapper.findData(page, reportVo));
    }

    @Override
    public Page findCrowd(int current, int number, ReportVo reportVo) {

        System.out.println(consumerDataMapper);
        Page page = new Page(current, number);
        return page.setRecords(consumerDataMapper.findCrowd(page, reportVo));
    }

}
